#!/bin/bash
export ANDROID_NDK_ROOT=/mnt/android_home/ndk/android-ndk-r28c
export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
rm -rf ./*
OPENSSL_DIR=$(pwd)/output/arm64-v8a/21
/opt/module/src/openssl/openssl-3.0.15/Configure \
android-x86_64 \
-D__ANDROID_API__=21 \
no-shared \
--prefix="$OPENSSL_DIR" \
--openssldir="$OPENSSL_DIR/ssl" \
--libdir=lib \
no-unit-test \
no-async \
no-asm \
no-tests \
enable-ssl-trace \
no-ssl3 \
no-comp \
no-tls1 \
no-tls1_1 \
no-weak-ssl-ciphers \
no-legacy \
no-external-tests

#CFLAGS="-g3 -O0 -fno-omit-frame-pointer -fPIC -march=arm64-v8a"

make -j$(nproc)
make install_sw install_ssldirs  # 只安装库和头文件，不安装文档







